#ifndef TCHARTCLRDIALOG_H
#define TCHARTCLRDIALOG_H

#include <QDialog>
#include <QDialog>
#include <QDialogButtonBox>
#include <QListView>
#include <QComboBox>
#include <QGridLayout>
#include <QPushButton>
#include <QLabel>

class TChart;
class TChartItem;
class QwtPlotCurve;
class QSpinBox;

class TChartClrDialog : public QDialog
{
    Q_OBJECT

    QGridLayout      * glay;
    QListView        * listView;
    QPushButton      * btnClr;
    QComboBox        * cbLineType;
    QDialogButtonBox * buttonBox;
    QSpinBox         * sbLineWidth;
    QSpinBox         * sbSplineDots;
    QLabel           * lblSplineDots;
    QLabel           * lblLineType;
    QLabel           * lblLineWidth;
    QPushButton      * btnDotsColor;
    QSpinBox         * sbDotsSize;
    QLabel           * lblDotsSize;
    QLabel           * lblDotsType;
    QComboBox        * cbDotsType;

    QVector< TChartItem* > * crtItems;
    
public:
    explicit TChartClrDialog( QWidget *parent = 0 );
    ~TChartClrDialog();

    int Exec( QVector< TChartItem* > * items );

private:
    TChartItem * getSelectedTChartItem();
    TChartItem * getTChartItem( QModelIndex ind );

    
private slots:
    void sltListviewClickItem( QModelIndex ind );
    void sltSetColor();
    void sltSetWidth();
    void sltSetLineType();
    void sltSetSplineDotsNum();
    void sltSetDotsColor();
    void sltSetDotsType();
    void sltSetDotsSize();
};

#endif // TCHARTCLRDIALOG_H
